@include('admin::layouts.header')
<div class="admin-main layui-anim layui-anim-upbit">
	<fieldset class="layui-elem-field layui-field-title">
		<legend>博客配置</legend>
	</fieldset>
	<form class="layui-form layui-form-pane" lay-filter="form">
		<div class="layui-form-item">
            <label class="layui-form-label">博客名称</label>
            <div class="layui-input-2">
                <input type="text"  name="name" value="{{$info['name']}}" placeholder="请输入博客名称" lay-verify="required" class="layui-input">
            </div>
        </div>
		
		<div class="layui-form-item layui-form-text">
            <label class="layui-form-label">SEO关键字</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入SEO关键字" lay-verify="required" name="keywords" class="layui-textarea">{{$info['keywords']}}</textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">SEO描述</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入SEO描述" lay-verify="required" name="description" class="layui-textarea">{{$info['description']}}</textarea>
            </div>
        </div>
		 <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">声明</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入声明" lay-verify="required" name="statement" class="layui-textarea">{{$info['statement']}}</textarea>
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-2">
                <input type="text"  name="username" value="{{$info['username']}}" placeholder="请输入姓名" lay-verify="required" class="layui-input">
            </div>
        </div>
		
		<div class="layui-form-item">
            <label class="layui-form-label">职业</label>
            <div class="layui-input-2">
                <input type="text"  name="profession" value="{{$info['profession']}}" placeholder="请输入职业" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">工作经验</label>
            <div class="layui-input-2">
                <input type="text"  name="experience" value="{{$info['experience']}}" placeholder="请输入工作经验" lay-verify="required" class="layui-input">
            </div>
        </div>
		
		<div class="layui-form-item">
            <label class="layui-form-label">住址</label>
            <div class="layui-input-2">
                <input type="text"  name="location" value="{{$info['location']}}" placeholder="请输入住址" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">腾讯地图KEY</label>
            <div class="layui-input-2">
                <input type="text"  name="map_key" value="{{$info['map_key']}}" placeholder="请输入腾讯地图KEY" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">Email</label>
            <div class="layui-input-2">
                <input type="text"  name="email" value="{{$info['email']}}" placeholder="请输入Email" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">Email代码</label>
            <div class="layui-input-2">
                <input type="text"  name="email_key" value="{{$info['email_key']}}" placeholder="请输入Email代码" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">QQ</label>
            <div class="layui-input-2">
                <input type="text"  name="qq" value="{{$info['qq']}}" placeholder="请输入QQ" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">微信号</label>
            <div class="layui-input-2">
                <input type="text"  name="weixin" value="{{$info['weixin']}}" placeholder="请输入微信号" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">百度url</label>
            <div class="layui-input-2">
                <input type="text"  name="baidu_url" value="{{$info['baidu_url']}}" placeholder="请输入百度seo推送url" lay-verify="required" class="layui-input">
            </div>
        </div>
		<div class="layui-form-item">
            <label class="layui-form-label">百度key</label>
            <div class="layui-input-2">
                <input type="text"  name="baidu_key" value="{{$info['baidu_key']}}" placeholder="请输入百度seo推送key" lay-verify="required" class="layui-input">
            </div>
        </div>
		@include('admin::layouts.edit_html_image',['name'=>'微信图','adPic'=>'adPic1','image_id'=>'weixin_pic','adBtn'=>'adBtn1','adPic_val'=> $info['image_weixin']['url'],'image_id_val'=>$info['weixin_pic']])
		
		
		@include('admin::layouts.edit_html_image',['name'=>'公众号图','adPic'=>'adPic2','image_id'=>'gz_pic','adBtn'=>'adBtn2','adPic_val'=> $info['image_gz']['url'],'image_id_val'=>$info['gz_pic']])
		
		@include('admin::layouts.edit_html_image',['name'=>'微信群图','adPic'=>'adPic3','image_id'=>'q_pic','adBtn'=>'adBtn3','adPic_val'=> $info['image_q']['url'],'image_id_val'=>$info['q_pic']])
		
		@include('admin::layouts.edit_ue',['name'=>'自我介绍','id'=>'content','value'=>$info['content']])
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button type="button" class="layui-btn" lay-submit="" lay-filter="submit">{!! config('admin.submit') !!}</button> 
			</div>
		</div>
	</form>
</div>
@include('admin::layouts.footer')
@include('admin::layouts.edit_ajax',['url'=>route('blog_admin.config.update',['id'=>$info['id']])])
@include('admin::layouts.edit_ajax_image',['url'=>route('admin.upload.upload_file'),'adPic'=>'#adPic1','image_id'=>'#weixin_pic','adBtn'=>'#adBtn1'])
@include('admin::layouts.edit_ajax_image',['url'=>route('admin.upload.upload_file'),'adPic'=>'#adPic2','image_id'=>'#gz_pic','adBtn'=>'#adBtn2'])
@include('admin::layouts.edit_ajax_image',['url'=>route('admin.upload.upload_file'),'adPic'=>'#adPic3','image_id'=>'#q_pic','adBtn'=>'#adBtn3'])

<script>
	layui.use(['form', 'layer'], function () {
        var form = layui.form,layer = layui.layer,$= layui.jquery;
		form.verify({	
			weixin_pic: function(value){  
				if(value == ''){  
					return '请上传微信图！';  
				}  
			},
			gz_pic: function(value){  
				if(value == ''){  
					return '请上传公众号图！';  
				}  
			},
			q_pic: function(value){  
				if(value == ''){  
					return '请上传微信群图！';  
				}  
			}
		});
    })
</script>